package com.qikux.dao;

import com.qikux.entity.Resource;
import com.qikux.entity.ResourceComment;
import com.qikux.vo.Page;

import java.util.List;
import java.util.Map;

public interface ResourceDao {

    List<Map<String,Object>> findTypes();

    void saveResource(Resource res);

    List<Map<String, Object>> findReses(String pid);

    List<Map<String, Object>> findHot(int i);

    List<Map<String, Object>> findHot(int i, Page<Map<String, Object>> pageBean);

    int findResourceHot(int i);

    List<Map<String, Object>> findDownloadResByUserIdAndResId(Long userId, Long resId);

    ResourceComment findResCommentByUserIdAndResId(Long userId, Long resId);

    void saveResComment(ResourceComment resourceComment);

    List<Map<String, Object>> findRes(int id, Page<Map<String, Object>> pageBean);

    int findResId(int id);

    List<Map<String, Object>> findFuzzy(String fname, Page<Map<String, Object>> pageBean);

    int findResFuzzy(String fname);

    List<Map<String, Object>> qureyresource(Long userId);
}
